package io.renren.modules.knowledge.respository;

import io.renren.modules.knowledge.entity.ship.MasterShip;
import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface MasterShipRespository extends Neo4jRepository<MasterShip,Long> {

    @Query("match (o:occupation{id:{occId}})  match (c) where id(c) = {courseId} with o,c create(o)-[:master]->(c) return o,c")
    void saveOccAndCourse(@Param("occId") Long occId,@Param("courseId") Long courseId);
}
